name: storygpt
endpoints:
- respond
compose:
  env_file:
  - .env
  build:
    args:
      SERVICE_PORT: 8126
      SERVICE_NAME: storygpt
      PRETRAINED_MODEL_NAME_OR_PATH: gpt2-medium
      FINETUNED_GPT_URL: http://files.deeppavlov.ai/dream_data/story_skill/filtered_ROCStories_gpt_medium.pt
      CUDA_VISIBLE_DEVICES: '0'
      FLASK_APP: server
    context: ./services/storygpt/
  command: flask run -h 0.0.0.0 -p 8126
  environment:
  - CUDA_VISIBLE_DEVICES=0
  - FLASK_APP=server
  deploy:
    resources:
      limits:
        memory: 10G
      reservations:
        memory: 10G
  volumes:
  - ./services/storygpt:/src
  - ~/.deeppavlov/cache:/root/.cache
  ports:
  - 8126:8126
proxy:
  command:
  - nginx
  - -g
  - daemon off;
  build:
    context: dp/proxy/
    dockerfile: Dockerfile
  environment:
  - PROXY_PASS=dream.deeppavlov.ai:8126
  - PORT=8126
